package com.register.controller;

import com.register.pojo.Forus;
import com.register.service.ForusService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;

@RestController("forusController")
public class ForusController {

    @Autowired
    private ForusService forusService;

    @RequestMapping("/ab")
    public Object getus(){
        List<Forus> list = forusService.getus();
        System.out.println(list);
        return list;
    }

    @PostMapping("/bc")
    public Object selectById(@RequestBody Forus forus){
        Object list = forusService.selectById(forus.getId());
        return list;
    }
}
